package com.bw.z.mvp.view.live.adapter;

import android.widget.ImageView;

import com.bw.z.R;
import com.bw.z.mvp.model.entity.LiveEntity;
import com.bw.z.network.Api;
import com.bw.z.utils.GlideUtils;
import com.chad.library.adapter.base.BaseQuickAdapter;
import com.chad.library.adapter.base.viewholder.BaseViewHolder;

import org.jetbrains.annotations.NotNull;

public class LiveAdapter extends BaseQuickAdapter<LiveEntity.Values, BaseViewHolder> {
    public LiveAdapter() {
        super(R.layout.item_live);
    }

    @Override
    protected void convert(@NotNull BaseViewHolder baseViewHolder, LiveEntity.Values values) {
        baseViewHolder.setText(R.id.live_item_title, values.live_title);
        ImageView img = baseViewHolder.getView(R.id.live_item_img);
        GlideUtils.getInstance().GlideImage(Api.FileUrl + values.live_img, img);
    }
}
